from flask import Flask, render_template

# 创建 Flask 应用实例
app = Flask(__name__)

# 路由：主页
@app.route('/',methods=['GET'])
def home():
    return "Hello, Welcome to my website!"

# 路由：关于页面
@app.route('/about', methods=['get'])
def about():
    return "This is the about page."

# 路由：动态内容
@app.route('/greet/<name>')
def greet(name):
    return f"Hello, {name}!"

# 启动服务
if __name__ == '__main__':
    app.run(debug=True)
